package com.jlcloud.core.secure.handler;

import com.jlcloud.core.secure.props.AuthSecure;
import com.jlcloud.core.secure.props.BasicSecure;
import com.jlcloud.core.secure.props.JlCloudSecureProperties;
import com.jlcloud.core.secure.props.SignSecure;
import org.springframework.web.servlet.HandlerInterceptor;

import java.util.List;

/**
 * secure 拦截器集合
 *
 * @author By: JlCloud <br>
 * @Package: com.jlcloud <br>
 * @CreateTime: 2024-12-03 21:45 <br>
 * @Copyright: 2021 www.jilianjituan.com Inc. All rights reserved. <br>
 * @Caution 注意：本内容仅限于冀联人力集团内部传阅，禁止外泄以及用于其他的商业目的 <br>
 */
public interface ISecureHandler {

	/**
	 * token拦截器
	 *
	 * @param secureProperties 授权配置
	 * @return tokenInterceptor
	 */
	HandlerInterceptor tokenInterceptor(JlCloudSecureProperties secureProperties);

	/**
	 * auth拦截器
	 *
	 * @param authSecures 授权集合
	 * @return HandlerInterceptor
	 */
	HandlerInterceptor authInterceptor(JlCloudSecureProperties secureProperties, List<AuthSecure> authSecures);

	/**
	 * basic拦截器
	 *
	 * @param basicSecures 基础认证集合
	 * @return HandlerInterceptor
	 */
	HandlerInterceptor basicInterceptor(List<BasicSecure> basicSecures);

	/**
	 * sign拦截器
	 *
	 * @param signSecures 签名认证集合
	 * @return HandlerInterceptor
	 */
	HandlerInterceptor signInterceptor(List<SignSecure> signSecures);

	/**
	 * client拦截器
	 *
	 * @param clientId 客户端id
	 * @return clientInterceptor
	 */
	HandlerInterceptor clientInterceptor(String clientId);

}
